import java.util.Scanner;
public class Demo2 {//找出字符串中第一个只出现一次的字符

        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            String s = in.nextLine();
            int[] count = new int[s.length()];
            for (int i = 0; i < s.length(); i++) {
                for (int j = i+1; j < s.length(); j++) {
                    if (s.charAt(i) == s.charAt(j)) {
                        count[i] = 1;
                        count[j] = 1;
                    }
                }
            }
            for (int i = 0; i < s.length(); i++) {
                if (count[i] == 0) {
                    System.out.print(s.charAt(i));
                    return;
                }
            }


            System.out.print(-1);

        }
}
